// reference

let obj = {
    name: "tom"
}

let ali = obj

obj = null

function objGroup(obj1, obj2) {
    obj1.prev = obj2
    obj2.next = obj1
    return {
        o1: obj1,
        o2: obj2
    }
}

let temp = objGroup({name: 1}, {name: 2})
console.log(temp)